package cn.tedu.mvc.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExecptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public String exception(RuntimeException e){
        return e.getMessage();
    }

}
